\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{hyperref,newtxtext}

\usepackage[square,numbers,compress]{natbib}
\bibliographystyle{unsrtnat}
 
\title{\bfseries Bibliography management: \texttt{natbib} package}
\author{Overleaf}
\date { }

\begin{document}
 
\maketitle
 
This document is an example of \texttt{natbib} package using in bibliography 
management. Three items are cited: \textit{The \LaTeX\ Companion} book \cite{latexcompanion}, the Einstein journal paper \citet{einstein}, and the 
Donald Knuth's website \cite{knuthwebsite}. The \LaTeX\ related items are
\cite{latexcompanion,einstein,knuthwebsite}. 
 

\textbf{Source:} \href{https://www.overleaf.com/learn/latex/Bibliography_management_with_natbib}{Overleaf: Bibliography management with natbib}
 
\medskip
 
\bibliography{sample}
 
\end{document}